/** 
 * Project Name:ecs-channel 
 * File Name:OrderListGetRequest.java 
 * Package Name:com.jala.ecschannel.isv.xhs.api.request 
 * Date:2018年5月14日下午2:36:56 
 * Copyright (c) 2018, liuyinsong@jala.com.cn All Rights Reserved. 
 * 
 */  
package com.grape.ciq.api.redbook.request;

import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.grape.ciq.api.redbook.ApiRuleException;
import com.grape.ciq.api.redbook.base.XHSRequest;
import com.grape.ciq.api.redbook.model.InventoriesPut;
import com.grape.ciq.api.redbook.response.InventorySynResponse;

/** 
 * ClassName: OrderListGetRequest <br/> 
 * Function: TODO ADD FUNCTION. <br/> 
 * date: 2018年5月14日 下午2:36:56 <br/> 
 * @author liuyinsong
 */
@JsonIgnoreProperties(ignoreUnknown=true) 
public class InventorySynRequest extends XHSRequest<InventorySynResponse> {

	private static final long serialVersionUID = 8433120831429671001L;

	//URL:/ark/open_api/v0/inventories/{barcode}
	@Override
	public void check() throws ApiRuleException {
	}

	@Override
	public String getMethodUrl() {
		return "/ark/open_api/v0/inventories/";
	}
	
	@Override
	public String getMethod() {
		return "PUT";
	}

	@Override
	public Map<String, Object> getParams() {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("qty", inventoriesPut.getQty());
		return map;
	}
	
	@Override
	public String getUrlParams() {
		return inventoriesPut.getBarcode();
	}

	private InventoriesPut inventoriesPut;

	public InventoriesPut getInventoriesPut() {
		return inventoriesPut;
	}

	public void setInventoriesPut(InventoriesPut inventoriesPut) {
		this.inventoriesPut = inventoriesPut;
	}

}
